<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024/11/28
  Time: 19:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <h1>
        基于 Spring 标签库的 表单提交 和 数据校验
    </h1>
    <form:form action="register3" id="registerForm" method="get" modelAttribute="user">
        <form:label path="username">用户名</form:label> <form:input path="username"></form:input> <form:errors path="username" cssClass="errorMsg"></form:errors> <br>
        <form:label path="password">密码</form:label> <form:input path="password"></form:input> <form:errors path="password" cssClass="errorMsg"></form:errors><br>
        <form:label path="userAge">年龄</form:label> <form:input path="userAge"></form:input> <form:errors path="userAge" cssClass="errorMsg"></form:errors> <br>
        <input type="submit" value="注册">
    </form:form>
</body>
</html>
